home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / apidev / clearb.c < prev    next >
C/C++ Source or Header  |  1989-11-06  |  656b  |  26 lines

  1. #include <dos.h>
  2. main()
  3.   {
  4.   struct find_t c_file;
  5.   struct dosdate_t date;
  6.   unsigned int today;
  7.  
  8.   _dos_getdate(&date);
  9.   today=((date.year-1980)*512)+(date.month*32)+date.day;
  10.  
  11.   if (_dos_findfirst ("m?m.bat",_A_NORMAL, &c_file)==0)
  12.     {
  13.     if (today-c_file.wr_date > 1) remove(c_file.name);
  14.       while (_dos_findnext(&c_file)==0)
  15.        if (today-c_file.wr_date > 1) remove(c_file.name);
  16.      
  17.     }
  18.  
  19.   if (_dos_findfirst ("m??m.bat",_A_NORMAL, &c_file)==0)
  20.     {
  21.     if (today-c_file.wr_date > 1) remove(c_file.name);
  22.     while (_dos_findnext(&c_file)==0)
  23.         if (today-c_file.wr_date > 1) remove(c_file.name);
  24.     }
  25.   }
  26.